package com.xl.sqlSession;

import com.xl.pojo.Configuration;

public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    /**
     * 创建会话对象
     * @return
     */
    @Override
    public SqlSession openSession() {
        return new DefaultSession(configuration);
    }
}
